function ret = inverse_kin(a)
addpath('./buildopt_torso')




%%%%If using the old version (no torso) use this:

% theta_a(a)
% 

%%%%If using the new version with the torso, use this: 
%%%%%(the calculation is broken up, saves a lot of computation time)

q = zeros(5,1);
q(2) = theta_a2(q,a);
q(5) = theta_a5(q,a);
q(1) = theta_a1(q,a);
q(4) = theta_a4(q,a);
q(3) = theta_a3(q,a);

ret = q;




end